1. Field of the Invention
This invention relates in general to computer-implemented database systems, and, in particular, to executing complex SQL queries using index screening for conjunct or disjunct index operations.
2. Description of Related Art
Databases are computerized information storage and retrieval systems. A Relational Database Management System (RDBMS) is a database management system (DBMS) which uses relational techniques for storing and retrieving data. Relational databases are organized into tables which consist of rows and columns of data. The rows are formally called tuples. A database will typically have many tables and each table will typically have multiple tuples and multiple columns. The tables are typically stored on direct access storage devices (DASD) such as magnetic or optical disk drives for semi-permanent storage.
A table can be divided into partitions, with each partition containing a portion of the table's data. By partitioning tables, the speed and efficiency of data access can be improved. For example, partitions containing more frequently used data can be placed on faster data storage devices, and parallel processing of data can be improved by spreading partitions over different DASD volumes, with each I/O stream on a separate channel path. Partitioning also promotes high data availability, enabling application and utility activities to progress in parallel on different partitions of data.
An index is an ordered set of references to the records or rows in a database file or table. The index is used to access each record in the file using a key and a RID or row location. The RID provides the physical location of a row (i.e., the page number and location within the page of a particular row). A key is one of the fields of the record or one of the attributes of a row. The key ensures that a row is unique.
With a direct access technique, an index is used to identify RIDs. Each RID is associated with a data page. Upon retrieving a RID, the direct access technique directly accesses the data page to retrieve the row identified by the RID. After this step of retrieving rows, a filter may be applied to the rows to eliminate some of them. However, because the filter is applied after the rows are retrieved, for the eliminated rows, the data pages were unnecessarily accessed. Therefore, there is a need in the art for improved index screening.